package com.example.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

//图书种类
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("category")
public class Category {

    //该类图书编号
    @TableId(type = IdType.AUTO)
    private Integer id;
    //该类图书名称
    private String name;
    //该类图书总数
    private Integer sum;
    //创建时间
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    //更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
